<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
    <script src="./cryptojs.js"></script>
</head>
<body>
    <div id="main"  style="width:300px;height:300px;background-color:red"></div>

    <script type="text/javascript">
        function encrypt(pwd) {
            console.log(pwd)
            const key = CryptoJS.enc.Latin1.parse("thanks,pig4cloud")
            var iv = key

            var encrypted = CryptoJS.AES.encrypt(pwd, key, {
                iv: iv,
                mode: CryptoJS.mode.CFB,
                padding: CryptoJS.pad.NoPadding
            })
            return encrypted.toString()
        }
    </script>
</body>
</html>